﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MensUnoShop.Filters
{
    public class NoCacheFilter : ActionFilterAttribute
    {
        private HttpContext _httpcontext = HttpContext.Current;
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            _httpcontext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
            _httpcontext.Response.Cache.SetExpires(DateTime.MinValue);
            _httpcontext.Response.Cache.SetNoStore();
            base.OnActionExecuting(filterContext);
        }

    }
}